#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int L = 0;
	scanf("%d", &L);
	int i = 2;
	int num = 0;
	while (L >= i)
	{
		int j = 0;
		int count = 0;
		for (j = 2; j <= i; j++)
		{
			if (i % j == 0)
				count++;
		}
		if (count == 1)
		{
			L -= i;
			printf("%d\n", i);
			num++;
		}
		i += 1;
	}
	printf("%d", num);
	return 0;
}